package com.xing.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xing.user.entity.LoginVo;
import com.xing.user.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xing.user.entity.UserInfoQueryVo;
import com.xing.user.vo.UserAuthVo;

import java.util.Map;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author xingfuao
 * @since 2022-07-20
 */
public interface UserInfoService extends IService<UserInfo> {

    /**
     * 用户手机号登录接口
     *
     * @param loginVo
     * @return
     */
    Map<String, Object> loginUser(LoginVo loginVo);

    /**
     * 根据openid判断
     *
     * @param openid
     * @return
     */
    UserInfo selectWxInfoOpenId(String openid);

    //用户认证
    void userAuth(Long userId, UserAuthVo userAuthVo);

    IPage<UserInfo> selectPage(Page<UserInfo> pageParam, UserInfoQueryVo userInfoQueryVo);

    //用户详情
    Map<String, Object> show(long userId);

    void lock(Long userId, Integer status);

    void approval(Long userId, Integer authStatus);
}
